<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// Matching other execCommand identifiers, execCommand("ForwardDelete") should
// not scroll the page to make selection visible.
selection_test(
    [
        '<div contenteditable>a|x</div>',
        '<div style="height:10000"></div>',
    ],
    selection => {
        if (!selection.document.queryCommandEnabled('ForwardDelete'))
            throw 'This test requires "ForwardDelete" command.';
        selection.window.scrollTo(0, 1000);
        const pageYOffset = selection.window.pageYOffset;
        selection.document.execCommand('ForwardDelete');
        assert_equals(selection.window.pageYOffset, 1000, 'window.pageYOffset');
    },
    [
        '<div contenteditable>a|</div>',
        '<div style="height:10000"></div>',
    ]);
</script>
